package com.apop.common.model;

/**
 * 错误码定义
 * @author Jiayi Zheng
 * @date 2021/11/9
 */
public class CodeMsg {

    private int code;
    private String msg;
    public static CodeMsg SERVER_ERROR = new CodeMsg(500, "服务端异常");
    public static CodeMsg ACTION_ERROR = new CodeMsg(404, "type错误 找不到action");
    public static CodeMsg MOCK_DATA_NOT_FOUND = new CodeMsg(500, "找不到mock data");
    public static CodeMsg RESULT_TYPE_NOT_FOUND = new CodeMsg(500, "result type未定义");
    public static CodeMsg REQUEST_PARAMS_NOT_FOUND = new CodeMsg(500, "params请求参数不足");
    public static CodeMsg SYSTEM_ERROR = new CodeMsg(500, "系统错误");
    public static CodeMsg BACK_END_ERROR = new CodeMsg(500, "后台业务异常！");

    public CodeMsg(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

}